package com.qc.sys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qc.sys.entity.SysDept;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * (SysDept)表数据库访问层
 *
 * @author AltmanQccc
 * @since 2020-08-29 14:02:25
 */
@Repository
public interface SysDeptDao extends BaseMapper<SysDept> {

    @Select("select max(ordernum) from sys_dept")
    Integer getMaxOrderNum();

    @Select("select count(1) from sys_dept where pid=#{id}")
    Integer queryDeptCountById(Integer id);
}